import fetch from '@/utils/fetch';
let prefix = 'api';
export default {
    regist(params) {
        return fetch({
          url: prefix + "/auth/regist",
          method: "POST",
          data: params,
          loading: true,
        });
    },
    // 登录
    login(params) {
        return fetch({
          url: prefix + "/auth/login",
          method: "POST",
          data: params,
          loading: true,
        });
    },
    getUserInfo() {
        return fetch({
            url: prefix + '/getUserInfo',
            method: 'GET',
        });
    },
    // 上传图片组
    // uploadImage(params) {
    //     return fetch({
    //         url: prefix + '/uploadImage',
    //         method: 'POST',
    //         body: params,
    //         loading: true,
    //     });
    // },
    publish(params) {
        return fetch({
            url: prefix + '/publish',
            method: 'POST',
            data: params,
            loading: true,
        });
    },
    getpicture(params) {
        return fetch({
            url: prefix + '/getpicture',
            method: 'GET',
            data: params,
            loading: true,
        });
    },
    getfrendimg(params) {
        return fetch({
            url: prefix + '/getfrendimg',
            method: 'GET',
            params: params,
            loading: true,
        });
    },
};
